//logs.js
const util = require('../../utils/util.js')

Page({
  data: {
    logs: []
  },
  onReachBottom() {
    console.log("bottom");
  },
  onLoad: function () {
    
    // 比较2个日期大小;
    function tab(date1, date2) {
      var oDate1 = new Date(date1);
      var oDate2 = new Date(date2);

      console.log(oDate1);
      console.log(oDate1.getTime());
      console.log(new Date());

      if (oDate1.getTime() > oDate2.getTime()) {
        console.log('第一个大');
      } else {
        console.log('第二个大');
      }  

    } 

    tab("2019-10-15 12:00:06","2019-10-15 12:00:05");

    
  
  }


})
